package com.league.blog.service.impl;

import com.league.blog.mapper.UserMapper;
import com.league.blog.pojo.User;
import com.league.blog.service.UserService;
import com.league.blog.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author 黄豪琦
 * 日期:2020-04-20 09:35
 * 说明:
 */
@Service("userService")
public class UserServiceImpl implements UserService {


    private UserMapper userMapper;

    @Override
    public User selectUserByAccountName(String accountName) {
        if(StringUtils.isBlank(accountName) || accountName == null){
            return null;
        } else {
            return userMapper.selectUserByAccountName(accountName);
        }
    }


    @Autowired
    public void setUserMapper(UserMapper userMapper) {
        this.userMapper = userMapper;
    }
}
